<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h2>history3</h2>
<button>后退</button>

<script>
    document.getElementsByTagName("button")[0].onclick = function (){
        // window.history.back()
        window.history.go(-2)
    }
</script>
</body>
</html>